package com.Wlongtao.eBusiness.services;


import com.Wlongtao.eBusiness.dao.PlayerRepository;
import com.Wlongtao.eBusiness.entity.Player;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PlayerService {
    @Autowired
    PlayerRepository playerRepository;

    public Player save(Player player){
        return playerRepository.save(player);
    }

    public List<Player> getAll(){
        return playerRepository.findAll();
    }
}
